//基本语法: () => {}
let array = [];
for (let i = 0; i < 100; i++){
    array.push(i);
}

// Expression bodies
let odds = array.map(v => v + 1);
let nums = array.map((v, i) => v + i);

// Statement bodies
let fives = [];
nums.forEach(v => {
  if (v % 5 === 0)
    fives.push(v);
});
console.log("fives:" + fives);

// Lexical this
let bob = {
  _name: "Bob",
  _program: ["Object-C", "Java", "C"],
  printFriends() {
    this._program.forEach(f =>
      console.log(this._name + " knows " + f));
  }
};
bob.printFriends();

//关于类的用法
import * as org from './School';
new org.School().doSomeThing();